Attached is a working example of a "long touch" algorithm.
The example uses a self cap sensor so the direction of interest is DOWN (conversion count decreases due to increase of capacitance during a touch).
If it were a mutual cap sensor the direction of interest would be UP.

So the demo works like this:

1. Long touch timeout set = 5sec (you choose appropriate timeout for your application)
2. During no touch event, LTA tracking enabled.
3. If a touch event lasting <5 sec, LTA is disabled during touch and sensor reports a touch.
4. After release, LTA tracking enabled again.

So far this is the normal Captivate touch sensing behavior.  Now lets look at how the long touch works.

1. If a touch event lasting (up to) 5 sec, LTA tracking is disabled and sensor reports a touch.
2. Now if touch continues longer than the 5 sec timeout, the long term algorithm will "re-calibrate" the LTA and conversion count, change the direction of interest from DOWN to UP and LTA tracking is enabled.
3. Important: The sensor's status will no longer report this as touch, however, the long term algorithm's touch status does (you want to use this status while in long term touch, not the sensor).
4. Next, if a release occurs that lasts < 5 sec, the long term status shows this as a release and the LTA is disabled during this short period of time.
5. But, if a touch re-occurs before the 5 sec timeout, the long term status switches back to a touch and the LTA is re-enabled.
6. Finally, if a release occurs that lasts > 5 sec, the long term algorithm  will "re-calibrate" the LTA and conversion count, the direction of interest changes from UP to DOWN, LTA tracking is enabled and long term touch status set to released.
7. System is now operating back in normal Captivate touch sensing mode until the next long touch event.